<?
	global $mySession;

?>
<script type="text/javascript">
next = 0;
total = <?=$this->countSpcl?>;
$(document).ready(function(e) {
	
	//loading special offers
    $(".home_right_box_wrap").html("<div align = 'center'><img src='<?=IMAGES_URL?>black-001-loading.gif'></div>");
	$(".home_right_box_wrap").load("<?=APPLICATION_URL?>index/spclofferppty");
	

});

function processTab(id)
{
	var i =1;
	$(".home_servic_tab ul li a").each(function(index, element) {
		$(this).removeClass("active");
		$("#inner_tab"+i).addClass("noactive");
		i++;
    });

	
	$("#tab"+id).addClass("active");	
	$("#inner_tab"+id).removeClass("noactive");

}

function loadspclOffr(d)
{		

		if(d==1 && this.next < this.total-1)
		this.next = this.next+1;
		else if(d == 0 && this.next > 0)
		this.next = this.next-1;
	    $(".home_right_box_wrap").html("<div align = 'center'><img src='<?=IMAGES_URL?>black-001-loading.gif'></div>");
		$(".home_right_box_wrap").load("<?=APPLICATION_URL?>index/spclofferppty/next/"+this.next);
}
</script>

<div class="home_services">
  <div class="home_servic_left">
    <div class="home_servic_tab">
   <ul>
     <li><a id = 'tab1' href="javascript:void(0)" class="active" onclick = 'processTab("1");'>Latest Properties</a></li>
     <li><a id = 'tab2' href="javascript:void(0)" onclick = 'processTab("2");'>Popular Properties</a></li>
     <li><a id =  'tab3' href="javascript:void(0)" onclick = 'processTab("3");'>Latest Reviews</a></li>
   </ul> 
    </div>
    
    <div class="tab_content"><!-- properties display tab-->
      
      <div id = "inner_tab1" class="tab_content_inner"><!-- tab 1 starts here-->
      <?
	  	$i = 1;	
		
	  	foreach($this->pptyArr as $values)
		{
			if($i%3 != 0)
			$class = "class='tab_conten_clmn'";	
			else
			$class = "class='tab_conten_clmn2'";	
	  ?>
          <div <?=$class?>>
            <div class="tab_box_text">
              <div class="tab_box_pic"><? ppty_image_display($values['image_name'])?></div>
              <div class="tab_box_detail">
                <div class="tab_box_heading"><?=$values['property_title']?></div>
                <div class="tab_box_dis"><?=substr($values['brief_desc'],0,50)?></div>
                <div class="tab_box_more"><a href="<?=APPLICATION_URL?>myaccount/preview/ppty/<?=$values['id']?>">read more&nbsp;&gt;&gt;</a></div>
              </div>
            </div>
            <div class="star_rank"><? rating_view($values['star_rating'])?></div>
          </div>
     <?
	   $i++;
        }
		
		if(count($this->pptyArr) == 0 )
		{
			for($i=1;$i<=6;$i++)
			{
				if($i%3 != 0)
				$class = "class='tab_conten_clmn'";	
				else
				$class = "class='tab_conten_clmn2'";	
	?>		
			
		  <div <?=$class?>>
            <div class="tab_box_text">
              <!--<div class="tab_box_pic"></div>-->
              <div class="tab_box_detail">
                <div class="tab_box_heading">&nbsp;</div>
                <div class="tab_box_dis">&nbsp;</div>
                <div class="tab_box_more">&nbsp;</div>
              </div>
            </div>
            <div class="star_rank">&nbsp;</div>
          </div>
			
			
	  
    <?	
			}
	
		}
      ?> 
      

      </div>
      
      <div id = "inner_tab2" class = "tab_content_inner noactive"><!-- tab2 starts here -->
      
      	<?
	  	$i = 1;	

	  	foreach($this->popularArr as $values)
		{
			if($i%3 != 0)
			$class = "class='tab_conten_clmn'";	
			else
			$class = "class='tab_conten_clmn2'";	
	  ?>
          <div <?=$class?>>
            <div class="tab_box_text">
              <div class="tab_box_pic"><? ppty_image_display($values['image_name'])?></div>
              <div class="tab_box_detail">
                <div class="tab_box_heading"><?=$values['property_title']?></div>
                <div class="tab_box_dis"><?=substr($values['brief_desc'],0,50)?></div>
                <div class="tab_box_more"><a href="<?=APPLICATION_URL?>myaccount/preview/ppty/<?=$values['id']?>">read more&nbsp;&gt;&gt;</a></div>
              </div>
            </div>
            <div class="star_rank"><? rating_view($values['star_rating'])?></div>
          </div>
     <?
	   $i++;
        }
		
		if(count($this->popularArr) == 0 )
		{
			for($i=1;$i<=6;$i++)
			{
				if($i%3 != 0)
				$class = "class='tab_conten_clmn'";	
				else
				$class = "class='tab_conten_clmn2'";	
	?>		
			
		  <div <?=$class?>>
            <div class="tab_box_text">
              <!--<div class="tab_box_pic"></div>-->
              <div class="tab_box_detail">
                <div class="tab_box_heading">&nbsp;</div>
                <div class="tab_box_dis">&nbsp;</div>
                <div class="tab_box_more">&nbsp;</div>
              </div>
            </div>
            <div class="star_rank">&nbsp;</div>
          </div>
			
			
	  
    <?	
			}
	
		}
      ?> 
      

      
      
      
      
      </div><!-- tab3 starts here-->
      
      
      <div id = "inner_tab3" class = "tab_content_inner noactive"><!-- tab2 starts here -->
      
      	<?
	  	$i = 1;	
		

	  	foreach($this->reviewArr as $values)
		{
			if($i%3 != 0)
			$class = "class='tab_conten_clmn'";	
			else
			$class = "class='tab_conten_clmn2'";	
	  ?>
          <div <?=$class?>>
            <div class="tab_box_text">
              <div class="tab_box_pic"><? ppty_image_display($values['image_name'])?></div>
              <div class="tab_box_detail">
                <div class="tab_box_heading"><?=substr($values['headline'],0, 10)?></div>
                <div class="tab_box_dis"><?=substr($values['review'],0,35)?></div>
                <div class="tab_box_more"><a href="<?=APPLICATION_URL?>myaccount/preview/ppty/<?=$values['id']?>">read more&nbsp;&gt;&gt;</a></div>
              </div>
            </div>
            <div class="star_rank"><? rating_view(floor($values['rating']/2))?></div>
          </div>
     <?
	   $i++;
        }
		
		if(count($this->popularArr) == 0 )
		{
			for($i=1;$i<=6;$i++)
			{
				if($i%3 != 0)
				$class = "class='tab_conten_clmn'";	
				else
				$class = "class='tab_conten_clmn2'";	
	?>		
			
		  <div <?=$class?>>
            <div class="tab_box_text">
              <!--<div class="tab_box_pic"></div>-->
              <div class="tab_box_detail">
                <div class="tab_box_heading">&nbsp;</div>
                <div class="tab_box_dis">&nbsp;</div>
                <div class="tab_box_more">&nbsp;</div>
              </div>
            </div>
            <div class="star_rank">&nbsp;</div>
          </div>
			
			
	  
    <?	
			}
	
		}
      ?> 
      

      
      
      
      
      </div><!-- tab3 ends here-->
      
    </div> 
    <!-- properties display tabs-->
    
    
    <div class="left_dis_wrap">
      <div class="left_deal_main">
        <div class="left_panel_heading">Deal a Trip Tweets</div>
        <div class="left_deal_clmn">
          <div class="left_deal_pic"><img src="<?=IMAGES_URL;?>hotel_pic41.png"></div>
          <div class="left_deal_detail">
            <div class="left_deal_head">Lorem Ipsum</div>
            <div class="left_deal_dis">For a small island Majorca packs a big punch with beaches, nightlife and outdoor adventure</div>
            <div class="left_deal_social">
              <div class="left_deal_fb"><a href="#"><img src="<?=IMAGES_URL;?>facebook_like.png"></a></div>
              <div class="left_deal_twit"><a href="#"><img src="<?=IMAGES_URL;?>follow_property.png"></a></div>
            </div>
          </div>
        </div>
        <div class="left_deal_clmn">
          <div class="left_deal_pic"><img src="<?=IMAGES_URL;?>hotel_pic41.png"></div>
          <div class="left_deal_detail">
            <div class="left_deal_head">Lorem Ipsum</div>
            <div class="left_deal_dis">For a small island Majorca packs a big punch with beaches, nightlife and outdoor adventure</div>
            <div class="left_deal_social">
              <div class="left_deal_fb"><a href="#"><img src="<?=IMAGES_URL;?>facebook_like.png"></a></div>
              <div class="left_deal_twit"><a href="#"><img src="<?=IMAGES_URL;?>follow_property.png"></a></div>
            </div>
          </div>
        </div>
        <div class="left_deal_clmn noborder">
          <div class="left_deal_pic"><img src="<?=IMAGES_URL;?>hotel_pic41.png"></div>
          <div class="left_deal_detail">
            <div class="left_deal_head">Lorem Ipsum</div>
            <div class="left_deal_dis">For a small island Majorca packs a big punch with beaches, nightlife and outdoor adventure</div>
            <div class="left_deal_social">
              <div class="left_deal_fb"><a href="#"><img src="<?=IMAGES_URL;?>facebook_like.png"></a></div>
              <div class="left_deal_twit"><a href="#"><img src="<?=IMAGES_URL;?>follow_property.png"></a></div>
            </div>
          </div>
        </div>
      </div>
      <div class="left_facebook">
        <div class="left_panel_heading">Facebook</div>
        <div class="left_facebook_clmn">
          <div class="left_facebook_head">Maecenas sed diam eget risus</div>
          <div class="left_facebook_dis">Maecenas sed diam eget risus var
            dsius orta gratvida  <a href="#">read more.. </a></div>
        </div>
        <div class="left_facebook_clmn">
          <div class="left_facebook_head">Maecenas sed diam eget risus</div>
          <div class="left_facebook_dis">Maecenas sed diam eget risus var
            dsius orta gratvida <a href="#">read more.. </a></div>
        </div>
        <div class="left_facebook_clmn noborder">
          <div class="left_facebook_head">Maecenas sed diam eget risus</div>
          <div class="left_facebook_dis">Maecenas sed diam eget risus var
            dsius orta gratvida <a href="#">read more.. </a></div>
        </div>
      </div>
    </div>
  </div>
  <div class="home_servic_right">
    <div class="home_right_heading">Special Offers</div>
   <div class="home_right_box_wrap">
   
    
   <!-- 
    <div class="home_right_box">
      <div class="home_right_pic"><img src="<?=IMAGES_URL;?>hotel_pic2.png"></div>
      <div class="home_right_detail">
        <div class="home_right_head">Las Vegas</div>
        <div class="home_right_dis">For a small island Majorca packs a big punch with beaches, nightlife and outdoor adventure</div>
      </div>
    </div>
    <div class="home_right_box">
      <div class="home_right_pic"><img src="<?=IMAGES_URL;?>hotel_pic3.png"></div>
      <div class="home_right_detail">
        <div class="home_right_head">Las Vegas</div>
        <div class="home_right_dis">For a small island Majorca packs a big punch with beaches, nightlife and outdoor adventure</div>
      </div>
    </div>
    <div class="home_right_box">
      <div class="home_right_pic"><img src="<?=IMAGES_URL;?>hotel_pic2.png"></div>
      <div class="home_right_detail">
        <div class="home_right_head">Las Vegas</div>
        <div class="home_right_dis">For a small island Majorca packs a big punch with beaches, nightlife and outdoor adventure</div>
      </div>
    </div>
    <div class="home_right_box">
      <div class="home_right_pic"><img src="<?=IMAGES_URL;?>hotel_pic3.png"></div>
      <div class="home_right_detail">
        <div class="home_right_head">Las Vegas</div>
        <div class="home_right_dis">For a small island Majorca packs a big punch with beaches, nightlife and outdoor adventure</div>
      </div>
    </div>
    <div class="home_right_box noborder">
      <div class="home_right_pic"><img src="<?=IMAGES_URL;?>hotel_pic2.png"></div>
      <div class="home_right_detail">
        <div class="home_right_head">Las Vegas</div>
        <div class="home_right_dis">For a small island Majorca packs a big punch with beaches, nightlife and outdoor adventure</div>
      </div>
    </div>
    
    -->
    </div>
    <div class="hr_arrow"><a id = 'spcl_prev' href="javascript:void(0);" onclick="loadspclOffr('0')"><img src="<?=IMAGES_URL;?>hr_left_arrow.png" width="26" height="17"></a>&nbsp;&nbsp;<a href="javascript:void(0);" id = 'spcl_next' onclick="loadspclOffr('1')"><img src="<?=IMAGES_URL;?>hr_right_arrow.png" width="26" height="17"></a></div>
  </div>
</div>
<div class="destination_wrap">
  <div class="desti_info">
    <div class="desti_info_dis">
      <div class="desti_info_head">Destination Information</div>
      <div class="desti_info_text">Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nam cursus. Morbi ut mi. Nullam enim leo, egestas id, condimentum at, laoreet mattis, massa. Sed eleifend nonummy diam. Praesent mauris ante, elementum et, bibendum at, posuere sit amet, nibh. Duis tincidunt lectus quis dui viverra vestibulum.</div>
      <div class="desti_temp">Average regional temperatures<br>
      </div>
      <div class="desti_temp_clmn1">
        <div class="desti_temp_inner">Dec - Feb 25&deg;C - 32&deg;C</div>
        <div class="desti_temp_inner">Mar - May 24&deg;C - 32&deg;C</div>
      </div>
      <div class="desti_temp_clmn1">
        <div class="desti_temp_inner">Jun - Aug 20&deg;C - 31&deg;C</div>
        <div class="desti_temp_inner">Sep - Nov 24&deg;C - 33&deg;C </div>
      </div>
    </div>
  </div>
  <div class="desti_right">
    <div class="desti_right_head">Book with confidence</div>
    <div class="desti_right_text">Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nam cursus. Morbi ut mi. Nullam enim leo, egestas id, condimentum at, laoreet mattis, massa. Sed eleifend nonummy diam. Praesent mauris ante, elementum et, bibendum at, posuere sit amet, nibh. Duis tincidunt lectus quis dui viverra vestibulum.<br><br>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nam cursus. Morbi ut mi. Nullam enim leo, egestas id, condimentum at, laoreet mattis, massa. Sed eleifend nonummy diam. Praesent mauris ante, elementum et, bibendum at, posuere sit amet, nibh. Duis tincidunt lectus quis dui viverra vestibulum.</div>
  </div>
</div>
<div class="client_panel_wrap">
  <div class="client_panel_left">
    <div class="client_left_row">
      <div class="client_left_title">Products</div>
      <div class="client_left_links"><a href="<?=APPLICATION_URL?>contents/pages/slug/hotels">Hotels</a>&nbsp;&nbsp;    |
      &nbsp;&nbsp;<a href="<?=APPLICATION_URL?>contents/pages/slug/holidays">Holidays</a>&nbsp;&nbsp;    |    
      &nbsp;&nbsp;<a href="<?=APPLICATION_URL?>contents/pages/slug/fight">Flights</a>    &nbsp;&nbsp;|
      &nbsp;&nbsp;<a href="<?=APPLICATION_URL?>contents/pages/slug/transfers">Transfers</a></div>
    </div>
    <div class="client_left_row">
      <div class="client_left_title">Generals</div>
      <div class="client_left_links"><a href="#">Agency Terms of Business </a>&nbsp;&nbsp;    |
      &nbsp;&nbsp;<a href="<?=APPLICATION_URL?>contents/pages/slug/privacy_policy">Privacy Policy</a>&nbsp;&nbsp;    |    
      &nbsp;&nbsp;<a href="<?=APPLICATION_URL?>contents/pages/slug/total_financial">Total Financial Protection</a> &nbsp;&nbsp;|
      &nbsp;&nbsp;<a href="<?=APPLICATION_URL?>contents/pages/slug/our_use">Our use of Cookies<br>
      </a></div>
    </div>

    <div class="client_left_row">
      <div class="client_left_title">Help</div>
      <div class="client_left_links"><a href="<?=APPLICATION_URL?>contents/pages/slug/customer_info">Customer Information</a>&nbsp;&nbsp;    |
      &nbsp;&nbsp;<a href="<?=APPLICATION_URL?>contents/pages/slug/contact_us">Contact Us</a>&nbsp;&nbsp;    |    
      &nbsp;&nbsp;<a href="<?=APPLICATION_URL?>contents/pages/slug/faq">Frequently Asked Questions</a> &nbsp;&nbsp;|
      &nbsp;&nbsp;<a href="<?=APPLICATION_URL?>contents/pages/slug/booking_info">Group Bookings</a></div>
    </div>
    <div class="client_left_row">
      <div class="client_left_title">Extras</div>
      <div class="client_left_links"><a target="_blank" href="http://ww2.affordablecarhire.com/en/search/index?brand=dynamicholidays">Car Hire </a>&nbsp;&nbsp;    |
      &nbsp;&nbsp;<a href="<?=APPLICATION_URL?>contents/pages/slug/airport_parking">Airport Parking</a>&nbsp;&nbsp;    |    
      &nbsp;&nbsp;<a href="<?=APPLICATION_URL?>contents/pages/slug/attractions">Attractions</a> &nbsp;&nbsp;|
      &nbsp;&nbsp;<a href="<?=APPLICATION_URL?>contents/pages/slug/insurance">Insurance</a></div>
    </div>
    <div class="client_left_row">
      <div class="client_left_title">More</div>
      <div class="client_left_links"><a href="<?=APPLICATION_URL?>contents/pages/slug/manage_booking">Manage Your Booking </a>&nbsp;&nbsp;    |
      &nbsp;&nbsp;<a href="#">Review Your Property</a>&nbsp;&nbsp;    |    
      &nbsp;&nbsp;<a href="<? if($mySession->uType == '2') echo APPLICATION_URL."myaccount/addproperty"; else echo APPLICATION_URL."signup/ownerregistration"; ?>">Add Your Property</a> &nbsp;&nbsp;|
      &nbsp;&nbsp;<a href="<?=APPLICATION_URL?>contents/pages/slug/careers">Careers</a>&nbsp;&nbsp;|
      &nbsp;&nbsp;<a href="<?=APPLICATION_URL?>contents/pages/slug/blog">Travel Republic Blog</a></div>
    </div>
  </div>
  <div class="client_panel_right"><a href="#"><img src="<?=IMAGES_URL;?>iata_logo.png" width="73" height="47"></a>&nbsp;<a href="#"><img src="<?=IMAGES_URL;?>abta_logo.png" width="106" height="52"></a>&nbsp;<a href="#"><img src="<?=IMAGES_URL;?>atol_logo.png" width="78" height="51"></a>&nbsp;<a href="#"><img src="<?=IMAGES_URL;?>norton_logo.png" width="105" height="51"></a>&nbsp;<a href="#"><img src="<?=IMAGES_URL;?>visa_logo.png" width="68" height="22"></a>&nbsp;&nbsp;<a href="#"><img src="<?=IMAGES_URL;?>american_logo.png" width="50" height="40"></a></div>
</div>
